package cu.tedu._05weibo.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;

@Data
public class UserRegDTO {
    //@NotNull(message = "用户名不能为NULL")
//    @NotEmpty(message = "用户名不能为空")
//    @NotBlank(message = "用户名不能为空白串")
//    @Size(min = 6, max = 20, message = "用户名长度必须在6到20之间")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5]{1,7}$|.{1,13}$",message = "用户名不能超过7个汉字或者14个字符")
    @ApiModelProperty(value = "用户名", required = true)
    private String username;
    @ApiModelProperty(value = "密码", required = true)
    private String password;
    @ApiModelProperty(value = "昵称", required = true)
    private String nickname;

}
